//数据全局共享的封装
import 'package:flutter/material.dart';

class CounterModel extends ChangeNotifier {
  int _counter = 0;
  // 获取当前计数
  int get counter => _counter;
  // 计数加1
  void increment() {
    _counter++;
    notifyListeners();
  }
}
